﻿// 彩票开奖配置 http://www.500wan.com/static/public/ssc/xml/newlyopen.xml


// 出错时等待
exports.errorSleepTime = 15;

// 重启时间间隔，以小时为单位，0为不重启
exports.restartTime = 0;

exports.baseUrl = "www.cj.com";  // 不能有http ssc.883134.com

// http://www.f8cp.com/
// http://111.n8cp.com/  www.k3win.com

exports.submit = {
	// host:'www.ssc.com',
	host : 'www.cj.com',
	path : '/admin.php/dataSource/kj'
}


global.log = function(log) {
	var date = new Date();
	console.log('[' + date.toDateString() + ' ' + date.toLocaleTimeString()
			+ '] ' + log)
}

function strtotime(str) {
	var new_str = str.replace(/\:/g, '-');
	new_str = new_str.replace(/\ /g, '-');
	var arr = new_str.split("-");
	arr[4] = arr[4] == undefined ? '0' : arr[4];
	arr[5] = arr[5] == undefined ? '0' : arr[5];
	arr[3] = arr[3] == undefined ? '0' : arr[3];
	var datum = new Date(Date.UTC(arr[0], arr[1] - 1, arr[2], arr[3] - 8,
			arr[4], arr[5]));
	return datum.getTime() / 1000;
}

